//
//  FenleiProductCollectionViewCell.m
//  tianjin
//
//  Created by 鞠超 on 16/8/6.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "FenleiProductCollectionViewCell.h"

@implementation FenleiProductCollectionViewCell

- (instancetype )initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if(self)
    {
        [self p_setupView];
    }
    
    return self;
}

- (void )p_setupView
{
    NSInteger item_length = (SCREEN_WIDTH / 4 * 3 - 40) / 3;
    
    self.image_product = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, item_length, item_length)];
    [self.contentView addSubview:self.image_product];
    
    
    self.name_product = [[UILabel alloc] initWithFrame:CGRectMake(3, CGRectGetMaxY(self.image_product.frame) + 10, item_length - 6, 15)];
    self.name_product.text = @"水果名称";
    self.name_product.textAlignment = NSTextAlignmentCenter;
    self.name_product.font = [UIFont systemFontOfSize:12];
    self.name_product.textColor = [UIColor grayColor];
    [self.contentView addSubview:self.name_product];
}


@end
